package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbRunningAccountMapper;
import com.bsb.base.model.BsbFirmExample;
import com.bsb.base.model.BsbRunningAccount;
import com.bsb.base.model.BsbRunningAccountExample;
import com.bsb.base.model.BsbUserExample;

@Service
public class BsbRunningAccountService{
	
	@Resource
	private BsbRunningAccountMapper bsbRunningAccountMapper;
	
	public void addBsbRunningAccount(BsbRunningAccount bsbRunningAccount) {
		bsbRunningAccountMapper.insertSelective(bsbRunningAccount);
	}
	
	public void delBsbRunningAccountByUuid(String uuid) {
		bsbRunningAccountMapper.deleteByPrimaryKey(uuid);
	}
	
	public void updateBsbRunningAccount(BsbRunningAccount bsbRunningAccount) {
		bsbRunningAccountMapper.updateByPrimaryKeySelective(bsbRunningAccount);
	}
	
	public void updateBsbRunningAccountByExample(BsbRunningAccount bsbRunningAccount,BsbRunningAccountExample bsbRunningAccountExample){
	    bsbRunningAccountMapper.updateByExampleSelective(bsbRunningAccount,bsbRunningAccountExample);
	}
	
	public BsbRunningAccount getBsbRunningAccountByUuid(String uuid) {
		return bsbRunningAccountMapper.selectByPrimaryKey(uuid);
	}
	
	public List<BsbRunningAccount> getPageBsbRunningAccount(BsbRunningAccountExample bsbRunningAccountExample) {
		return bsbRunningAccountMapper.selectPage(bsbRunningAccountExample);
	}
	
	public int countBsbRunningAccount(BsbRunningAccountExample bsbRunningAccountExample) {
		return bsbRunningAccountMapper.countByExample(bsbRunningAccountExample);
	}
	
	public List<BsbRunningAccount> selectByExample(BsbRunningAccountExample example){
	    return bsbRunningAccountMapper.selectByExample(example);
	}

	public int countRunningAccount(BsbRunningAccountExample bsbRunningAccountExample, BsbUserExample userExample,
			BsbFirmExample firmExample) {
		return bsbRunningAccountMapper.countRunningAccount(bsbRunningAccountExample,userExample,firmExample);
	}

	public List<BsbRunningAccount> getPageRunningAccount(BsbRunningAccountExample bsbRunningAccountExample,
			BsbUserExample userExample, BsbFirmExample firmExample) {
		return bsbRunningAccountMapper.getPageRunningAccount(bsbRunningAccountExample,userExample,firmExample);
	}
}
